//
//  RecentActivityCell.m
//  kr_36
//
//  Created by lmt on 16/1/22.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "RecentActivityCell.h"

@implementation RecentActivityCell

- (void)dealloc
{
    [_img release];
    [_time release];
    [_status release];
    [_address release];
    [_time release];
    [_desc release];
    
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.img = [[UIImageView alloc] init];
      //  _img.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_img];
        [_img release];
        
        self.title = [[UILabel alloc] init];
       // _title.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_title];
        _title.numberOfLines = 0;
        [_title release];
        
        self.desc = [[UILabel alloc] init];
        [self.contentView addSubview:_desc];
        _desc.font = [UIFont systemFontOfSize:14];
        [_desc release];
        
        self.status = [[UILabel alloc] init];
       // _status.backgroundColor = [UIColor cyanColor];
        [self.contentView addSubview:_status];
        _status.font = [UIFont systemFontOfSize:12];
        [_status release];
        
        self.address = [[UILabel alloc] init];
       // _address.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_address];
        _address.font = [UIFont systemFontOfSize:12];
        [_address release];
        
        self.time = [[UILabel alloc] init];
      //  _time.backgroundColor = [UIColor magentaColor];
        [self.contentView addSubview:_time];
        _time.font = [UIFont systemFontOfSize:12];
        _time.textAlignment = NSTextAlignmentRight;
        [_time release];
        
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _img.frame = CGRectMake(5, 5, self.contentView.frame.size.width - 10, 150);
    
    _title.frame = CGRectMake(5, 155, _img.frame.size.width, 40);
    
    _desc.frame = CGRectMake(5, 200, _title.frame.size.width, 40);
    
    _status.frame = CGRectMake(5, 245, 60, 40);
    
    _address.frame = CGRectMake(60, 245, 100, 40);
    
    _time.frame = CGRectMake(170, 245, self.contentView.frame.size.width - 180, 40);
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
